package com.pojo;

import com.auto.annotation.AutoCode;
import com.auto.annotation.Column;
import com.auto.annotation.MyFunction;
import com.auto.annotation.Table;

/**
 * 科室信息
 * @author CFQ
 *
 */
@AutoCode(isOverride=false,includeSupperClass=false,showWay = "tree")
@Table(name="PM_DEPT",includeSupperClass=false)
@MyFunction(autoInitFromAccess=true,copyLastYearData=true,treeSort=false)
public class DeptInfo extends TreeNodeBean{
	/**
	 *
	 */
	private static final long serialVersionUID = -9011777967101276026L;
	/**
	 * 主键，自动生成
	 */
	@Column(flag="primary",treeId=true,autoGenneral=true)
	private String pid;
	/**
	 * 关联单位编号
	 */
	@Column(jsname="单位编号",jswidth=150,jsAllowBlank=false)
	private String companyid;
	/**
	 * 关联的单位名称
	 */
	private String companyname;
	/**
	 * 科室编号
	 */
	@Column(treecolumn=true,jsname="科室编号",jswidth=150,jsAllowBlank=false,jsValidator=true,keyWordFilte=true)
	private String deptid;
	/**
	 * 科室名称
	 */
	@Column(jsname="科室名称",jsAllowBlank=false,jswidth=150,keyWordFilte=true)
	private String deptname;
	/**
	 * 助记码
	 */
	@Column(keyWordFilte=true)
	private String zjm;
	/**
	 * 科室类型，取系统字典进行选择
	 */
	@Column(jsname="科室类型",jsAllowBlank=false,jswidth=150)
	private String depttype;
	/**
	 * 父节点
	 */
	@Column(treeparentId=true)
	private String parentid;
	/**
	 * 是否叶子节点
	 */
	@Column(treeleaf=true)
	private int isleaf;
	/**
	 * 科室状态，停用还是启用
	 */
	@Column(jsname="科室状态",render="function(v){if(v=='1'){return '已停用';}else {return '启用中';}}",
			jsxtype="radiogroup [items:[{"
					+"inputValue: '0',"
					+"boxLabel: '启用',"
					+"anchor  : '60%',"
					+"name  : 'isstop',"
					+"checked: true"
					+"}, {"
					+"inputValue: '1',"
					+"anchor  : '60%',"
					+"name  : 'isstop',"
					+"boxLabel: '停用'"
					+"}]]")
	private int isstop;// 0启用,1停用

	//===========================GETTERS && SETTERS=============================//


	public String getPid() {
		return pid;
	}

	public void setPid(String pid) {
		this.pid = pid;
	}

	public String getCompanyid() {
		return companyid;
	}

	public void setCompanyid(String companyid) {
		this.companyid = companyid;
	}

	public String getCompanyname() {
		return companyname;
	}

	public void setCompanyname(String companyname) {
		this.companyname = companyname;
	}

	public String getDeptid() {
		return deptid;
	}

	public void setDeptid(String deptid) {
		this.deptid = deptid;
	}

	public String getDeptname() {
		return deptname;
	}

	public void setDeptname(String deptname) {
		this.deptname = deptname;
	}

	public String getZjm() {
		return zjm;
	}

	public void setZjm(String zjm) {
		this.zjm = zjm;
	}

	public String getDepttype() {
		return depttype;
	}

	public void setDepttype(String depttype) {
		this.depttype = depttype;
	}

	public String getParentid() {
		return parentid;
	}

	public void setParentid(String parentid) {
		this.parentid = parentid;
	}

	public int getIsleaf() {
		return isleaf;
	}

	public void setIsleaf(int isleaf) {
		this.isleaf = isleaf;
	}

	public int getIsstop() {
		return isstop;
	}

	public void setIsstop(int isstop) {
		this.isstop = isstop;
	}
}
